package cn.psvmc.cxzapi.model.goods;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 商品租赁方案表
 * @Author auto
 * @Date 2024-08-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("t_goods_rent")
public class TGoodsRent implements Serializable {

    @Serial
    private static final long serialVersionUID = -7662036887187838274L;
    //商品租赁方案id
    @TableId(value = "grid", type = IdType.AUTO)
    private Integer grid;

    //商品id
    @TableField("goods_id")
    private Integer goodsId;

    //租赁方案（1 租完需归还 2租完可归还/买断 3租完即送）
    @TableField("type")
    private Integer type;

    //最低租期
    @TableField("min_day")
    private Integer minDay;

    //最高租期
    @TableField("max_day")
    private Integer maxDay;

    //租期天数
    @TableField("days")
    private String days;

    //创建人id
    @TableField(value = "createid", fill = FieldFill.INSERT)
    private Integer createid;

    //创建时间
    @TableField(value = "createtime", fill = FieldFill.INSERT)
    private LocalDateTime createtime;

    //是否缺货（0不缺 1缺）
    @TableField(exist = false)
    private Integer outStock;

    //库存
    @TableField(exist = false)
    private Integer stock;

    //押金
    @TableField(exist = false)
    private Double deposit;

    //买断价格
    @TableField(exist = false)
    private Double buyPrice;


}
